package com.yxzr.youyou.utils;

import android.content.Context;
import android.content.Intent;

import com.yxzr.youyou.LoginActivity;


public class StatusUtils {
    public Context context;
    public SharedPreferencesHelper sharedPreferencesHelper;
    public StatusUtils(Context context){
        this.context = context;
        sharedPreferencesHelper = new SharedPreferencesHelper(context,"logindata");
    }
    public boolean isLogin(){
        if ("".equals(sharedPreferencesHelper.getSharedPreference("token",""))){
            return false;
        }
        return true;
    }

    public void toLoginActivity(){
        Intent intent = new Intent(context, LoginActivity.class);
        context.startActivity(intent);
    }
}
